package jmine.tec.security.impl;

import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageCreator;
import bancosys.tec.exception.MessageCreatorHelper;

/**
 * @author lundberg
 */
public enum SecurityMessages implements MessageCreator {
    INVALID_CREDENTIAL_SERVICE_IMPLEMENTATION(1, "jmine.tec.security.impl.invalid.credential.service.implementation"),

    USER_PASSWORD_NOT_FOUND(0, "jmine.tec.security.impl.user.password.not.found");

    private final MessageCreator delegate;

    /**
     * Construtor
     * 
     * @param nargs nargs
     * @param key key
     */
    private SecurityMessages(int nargs, String key) {
        this.delegate = MessageCreatorHelper.creator("jmine-tec-security-impl-messages", key, nargs);
    }

    /**
     * {@inheritDoc}
     */
    public LocalizedMessageHolder create(Object... arguments) {
        return this.delegate.create(arguments);
    }

    /**
     * {@inheritDoc}
     */
    public int getExpectedArguments() {
        return this.delegate.getExpectedArguments();
    }
}
